classicube_sys\vectors\matrix/ops.rs
1use core::ops::Mul;
2
3use crate::{
4 Matrix_Identity,
5 bindings::{Matrix, Matrix_Mul},
6};
7
8impl Mul<Self> for Matrix {
9 type Output = Self;
10
11 fn mul(self, right: Self) -> Self {
12 let mut result = Matrix_Identity;
13 unsafe {
14 Matrix_Mul(&raw mut result, &raw const self, &raw const right);
15 }
16 result
17 }
18}